﻿using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Expression;
using Castle.ActiveRecord;
using NHibernate.Type;
using Castle.ActiveRecord.Queries;

namespace Mang24k99.Model.Dissertation
{
    public partial class MColumnsTable:HYXInfo
    {
        /// <summary>
        /// 模糊查询该栏目
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public static MColumnsTable[] Search(string param)
        {
            try
            {
                string hql = @"from MColumnsTable c where c.Spell like '" + param + "%' and c.BLeafNode=1 order by ColumnID desc";
                SimpleQuery sq = new SimpleQuery(typeof(MColumnsTable), hql, null);
                return (MColumnsTable[])ExecuteQuery(sq);
            }
            catch { return null; }
        }

    }
}
